package com.Maykk.Demo06;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @ClassName: ReceiveServer
 * @Description: TODO 接收客户端发来的键盘输入内容
 * @Author: MaykkStar@163.com
 */
public class ReceiveServer {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(9527);
        Socket socket = serverSocket.accept();

        BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
        String line;
        while ((line = br.readLine()) != null) {
            System.out.println("客户端 > " + line);
        }


        serverSocket.close();
    }
}
